Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

providers/google: Change account_file to expect a JSON string #2839

Merged
merged 9 commits into from
Jul 29, 2015

Conversation

justincampbell
Copy link
Contributor

Using the Google provider from Atlas if currently not possible without committing the account_file to version control, or only using terraform push. This adds account_file_contents to allow specifying the contents of the account_file in an environment variable (encrypted on Atlas).

@justincampbell
Copy link
Contributor Author

Going to change this to only use account_file and detect JSON/file path. In a future release, we'll stop supporting the file path.

}

var account accountFile
if err := json.Unmarshal([]byte(value), &account); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to detect if value here is a JSON file, or the contents of a file. If I supply somefile.json or even just the word what, this will throw an error:

invalid character 'w' looking for beginning of value

I'm thinking we shouldn't return in this error block, instead return if there is no error (we found json, yay)

@justincampbell justincampbell changed the title providers/google: Add account_file_contents providers/google: Change account_file to expect a JSON string Jul 29, 2015
@justincampbell
Copy link
Contributor Author

This is ready, just waiting on #2878 to be merged first

@phinze
Copy link
Contributor

phinze commented Jul 29, 2015

Ok landed #2878 - LGTM - you can do the honors @justincampbell 😀

justincampbell added a commit that referenced this pull request Jul 29, 2015
providers/google: Change account_file to expect a JSON string
@justincampbell justincampbell merged commit 79e5c9d into master Jul 29, 2015
@justincampbell justincampbell deleted the gce-account-file-contents branch July 29, 2015 20:02
davidwadden added a commit to cloudfoundry-attic/lattice-release that referenced this pull request Aug 12, 2015
  + Google provider sets account file JSON contents instead of path
    - See hashicorp/terraform#2839

[Finishes #101087224]

Signed-off-by: Damon Anderson <[email protected]>
ryane added a commit to mantl/mantl that referenced this pull request Aug 20, 2015
@ghost
Copy link

ghost commented May 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants